<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> 

<form id="menuInfoForm">
	<div class="row" style="margin-top:20px;padding-left:20px;">
		<div class="form-group form-inline col-sm-6">
	    	<label for="menuName" class="">名称：</label>
     		<input class="form-control" type="text" name="menuName" value="${menu.menuName }" placeholder="请输入菜单名">
     		<input type="hidden" name="menuId" value="${menu.menuId }">
   		</div>
   		<div class="form-group form-inline col-sm-6">
	    	<label for="menuUrl" class="">地址：</label>
     		<input class="form-control"name="menuUrl" value="${menu.menuUrl }" type="text" placeholder="请输入地址">
   		</div>
	</div>
	<div class="row" style="margin-top:20px;padding-left:20px;">
		<div class="from-group form-inline col-sm-6">
	    	<label for="menuIcon" class="">图标：</label>
     		<input class="form-control" name="menuIcon" value="${menu.menuIcon }" type="text" placeholder="请输入图标名">
   		</div>
   		<div class="form-group form-inline col-sm-6">
	    	<label for="menuType" class="">类型：</label>
     		<input class="form-control" name="menuType" value="${menu.menuType }" type="text" placeholder="请输入类型">
   		</div>
	</div>
	<div class="row" style="margin-top:20px;padding-left:20px;">
		<div class="from-group form-inline col-sm-6">
	    	<label for="menuSort" class="">序号：</label>
     		<input class="form-control" name="menuSort" value="${menu.menuSort }" type="text" placeholder="请输入序号">
   		</div>
   		<div class="form-group form-inline col-sm-6">
	    	<label for="parentId" class="">所属菜单：</label>
	    	<select class="form-control" style="width:179px;" name="parentId">
	    		<option value="">--请选择--</option>
	    		<c:if test="${!empty parentMenu}">
		    		<c:forEach items="${parentMenu}" var="parent">
		    			<c:if test="${parent.menuId eq menu.parentId}">
		    				<option value="${parent.menuId }" selected="selected"> ${parent.menuName }</option>
		    			</c:if>
		    			<c:if test="${parent.menuId ne menu.parentId}">
			    			<option value="${parent.menuId }"> ${parent.menuName }</option>
		    			</c:if>
		    		</c:forEach>
	    		</c:if>
	    	</select>
     		<!-- <input class="form-control" name="parentId" value="${menu.parentId }" type="text" placeholder="请输入所属菜单">  -->
   		</div>
	</div>
	<div class="row" style="margin-top:20px;padding-left:20px;">
		<div class="from-group form-inline col-sm-6">
	    	<label for="created" class="">创建日期：</label>
     		<input class="form-control" name="created" value="<fmt:formatDate value="${menu.created}" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly="readonly" type="text" placeholder="请输入用户名">
   		</div>
   		<div class="form-group form-inline col-sm-6">
	    	<label for="modified" class="">修改日期：</label>
     		<input class="form-control" name="modified" value="<fmt:formatDate value="${menu.modified}" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly="readonly" type="text" placeholder="请输入用户名">
   		</div>
	</div>
	<div class="row" style="margin-top:20px;padding-left:20px;">
		<div class="from-group form-inline col-sm-6">
	    	<label for="disabled" class="">是否启用：</label>
			<c:if test="${menu.disabled eq 1 }">
	     		<input name="disabled" id="disabled" type="checkbox" checked="checked" value="1">
			</c:if>
			<c:if test="${menu.disabled eq 0 }">
	     		<input name="disabled" id="disabled" type="checkbox" value="1">
			</c:if>	    	
   		</div>
	</div>
	<div style="width:100%;text-align:center">
		<button type="submit" class="btn btn-warning" style="width:120px;margin-top:30px;margin-right:30px;">保存</button>
		<button type="button" class="btn btn-danger deletMenu" style="width:120px;margin-top:30px;">删除</button>
	</div>
</form>